package cn.com.dcsgo.mybatis.plus.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.Getter;

/**
 * 用户状态枚举类
 *
 * @author Dcsgo
 * @since 2024/9/1 08:54
 */
@Getter
public enum UserStatus {
    NORMAL(1, "正常"),
    FROZEN(2, "冻结");

    @EnumValue
    private final int value;
    @JsonValue//枚举类要返回给返回给前端的属性是那个就注解那个(默认返回的是枚举常量的名字)
    private final String desc;

    UserStatus(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }
}
